﻿using System;
using System.Web.Configuration;
using System.Data;

public partial class manager_taskfinish_view : System.Web.UI.Page
{
    public int taskid = 0;
    DBHelper db = new DBHelper(WebConfigurationManager.ConnectionStrings["connString"].ConnectionString);
    protected void Page_Load(object sender, EventArgs e)
    {
        taskid = Convert.ToInt32(Request.QueryString["taskid"]);
        Edit_Id.Value = taskid.ToString();
        if (!IsPostBack)
        {
            loadEditData(taskid);
        }
    }
    private void loadEditData(int sid)
    {
        string sql = "select * from v_A_Task where id=" + sid;
        DataTable dt = db.getList(sql);
        if (dt.Rows.Count == 1)
        {
            txt_title.Value = dt.Rows[0]["title"].ToString();
            txt_ms.Value = dt.Rows[0]["detail"].ToString();
            txt_fb_username.Value = dt.Rows[0]["fb_username"].ToString();
            txt_rq_start.Value = dt.Rows[0]["rq_start"].ToString();
            txt_rq_yjs.Value = dt.Rows[0]["rq_yjs"].ToString();
            ys_psid_mc.Value = dt.Rows[0]["ys_psid_mc"].ToString() + "|" + dt.Rows[0]["ys_psid_UserName"].ToString();
            eval_ps_mc.Value = dt.Rows[0]["eval_ps_mc"].ToString();
            eval_parps_mc.Value = dt.Rows[0]["eval_parps_mc"].ToString();
            eval_deptps_mc.Value = dt.Rows[0]["eval_deptps_mc"].ToString();
            txt_bz_js.Value = dt.Rows[0]["bz_js"].ToString();
            txt_bz_ys.Value = dt.Rows[0]["bz_ys"].ToString();
            ddlIsUsing.Value = dt.Rows[0]["GP"].ToString() + "/" + dt.Rows[0]["SP"].ToString(); ;


        }
    }
}